﻿// *********************************************************************
// * Copyright © 2013 Scanvaegt Nordic A/S
// *
// * This file is the property of Scanvaegt Nordic A/S and may not be 
// * distributed without the written consent of the author.    
// ********************************************************************

using System;
using System.Data;
using SqlPad.Library.Interfaces;

namespace SqlPad.Library.Models
{
    public class DataTableQueryResult : IQueryResult<DataTable>
    {
        public DataTableQueryResult(string query, TimeSpan time, DataTable result, DataTable schema)
        {
            RowsReturned = result.Rows.Count;
            Query = query;
            ExecuteTime = time;
            Result = result;
            Schema = schema;
        }

        public string Query { get; private set; }
        public int RowsReturned { get; private set; }
        public TimeSpan ExecuteTime { get; private set; }
        public DataTable Result { get; private set; }
        public DataTable Schema { get; private set; }
    }
}